//引入重置样式
require('../../assets/css/reset.css')

//引入公共样式
require('../../assets/css/property.css')

//引入广告部分得样式
require('./advert.less')

//等dom加载完毕之后操作dom
window.onload = () => {
    const countdown = document.querySelector('#countdown')
  
    //倒计时
    function count() {
      let time = 5
      let timer = setInterval(() => {
        //时间为1 跳转到首页
        if (time === 1) {
          clearInterval(timer)
          window.location.href = './home.html'
          return
        }
        time--
        countdown.innerHTML = `${time}s`
      }, 1000)
    }
  
    //执行倒计时
    count()
}